package action.articleclass;

import java.util.List;
import java.util.Map;

import org.apache.struts2.ServletActionContext;

import service.ArticleClassService;
import bean.User;

import com.opensymphony.xwork2.ActionSupport;

import dao.ArticleClassDao;

public class CheckArticleClassesAction extends ActionSupport {
	private ArticleClassService articleClassService;
	
	@Override
	public String execute() throws Exception {
		Map session=ServletActionContext.getContext().getSession();
		User u=(User) session.get("user");
		if(u==null)
			return INPUT;
		List l=articleClassService.getAllArticleClassesByUserid(u.getId());
		ServletActionContext.getRequest().setAttribute("list", l);
		return SUCCESS;
	}

	public ArticleClassService getArticleClassService() {
		return articleClassService;
	}

	public void setArticleClassService(ArticleClassService articleClassService) {
		this.articleClassService = articleClassService;
	}

	
	
}
